home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / sys-devel / patch-2.5.9 / patch-2.5.9.ebuild < prev    next >
Encoding:
Text File  |  2005-10-13  |  1.4 KB  |  49 lines

  1. # Copyright 1999-2005 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/sys-devel/patch/patch-2.5.9.ebuild,v 1.23 2005/03/04 04:52:48 vapier Exp $
  4.  
  5. inherit flag-o-matic
  6.  
  7. DESCRIPTION="Utility to apply diffs to files"
  8. HOMEPAGE="http://www.gnu.org/software/patch/patch.html"
  9. #SRC_URI="mirror://gnu/patch/${P}.tar.gz"
  10. #Using own mirrors until gnu has md5sum and all packages up2date
  11. SRC_URI="mirror://gentoo/${P}.tar.gz"
  12.  
  13. LICENSE="GPL-2"
  14. SLOT="0"
  15. KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
  16. IUSE="build static"
  17.  
  18. DEPEND=""
  19.  
  20. src_compile() {
  21.     strip-flags
  22.     CFLAGS="$CFLAGS -DLINUX -D_XOPEN_SOURCE=500"
  23.     # workaround for hardened on amd64, 1st part
  24.     if use amd64 && is-ldflags -pie; then
  25.         einfo Stripping "-pie" from LDFLAGS, adding it to Makefile manually
  26.         filter-ldflags -pie
  27.         append-flags -fPIC
  28.         LDFLAGS_PIE="1"
  29.     fi
  30.     ac_cv_sys_long_file_names=yes \
  31.         ./configure --host=${CHOST} --prefix=/usr --mandir=/usr/share/man
  32.     # workaround for hardened on amd64, 2nd part
  33.     if [ "${LDFLAGS_PIE}" = "1" ]; then
  34.         einfo "Patching Makefile..."
  35.         sed -i -e 's/^LDFLAGS =/& -pie/' Makefile || die "Patching Makefile failed!"
  36.     fi
  37.     use static && append-ldflags -static
  38.     emake LDFLAGS="${LDFLAGS}" || die "emake failed"
  39. }
  40.  
  41. src_install() {
  42.     einstall || die
  43.     if ! use build ; then
  44.         dodoc AUTHORS ChangeLog NEWS README
  45.     else
  46.         rm -rf ${D}/usr/share/man
  47.     fi
  48. }
  49.